$import("com.joypard.platform.kits.KitsView");
$import("com.joypard.platform.kits.KitsService");

/**
 * 配置工具控制器
 */
K.defCtrl("com.joypard.platform.kits.KitsCtrl", {

	initialize : function() {
		this.view = new KitsView();
		this.service = new KitsService();

		E.addEvents("assingAdminRoleSuccessEvent");
		E.addListener("assingAdminRoleEvent", this.onAssingAdminEvent, this);
	},

	onAssingAdminEvent : function(params) {
		var input = K.input({
			params : params,
			success : function(text) {
				var output = K.output(text);
				if (!output.showError()) {
					E.fireEvent("assingAdminRoleSuccessEvent", output);
				}
			}
		});
		this.service.assingAdmin(input);
	}
});